<?php /* -*- PHP -*- */
require 'Global.php';

if (!$pathInfo = XiteCode::parsePathInfo()) {
  XiteCode::redirect(LINK_ROOT);
}

if ($page = XiteCode::getPageByName($pathInfo[1])) {
  $Template->assign($page);
  $Template->render('XiteCode_Page.html');
  exit;
}

XiteCode::redirect(LINK_ROOT);

?>
